﻿#ifndef COMBOX_H
#define COMBOX_H

#include <QComboBox>
#include "ResizeBase.h"
#include "ui_base_lib_global.h"
class UI_BASE_LIBSHARED_EXPORT  Combobox : public QComboBox,public ResizeBase
{
    Q_OBJECT
public:
    explicit Combobox(QWidget *parent = nullptr);
        static void initCombox(Combobox* p , QString str , int x , int y , int w , int h , QString style , QStringList list);
        void setValue(int index);
        int getValue();
        void setEmitFlag();
protected:
    virtual void keyPressEvent(QKeyEvent *e);
protected:
        bool m_emitFlag;
signals:
   void evt_indexChanged(int index);
   void evt_indexActivated(int index);
public slots:
        void on_indexChanged(int index);
           void on_indexActivated(int index);

};

#endif // COMBOX_H
